package com.flyduck.system.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.flyduck.system.entity.SysConfigValueEntity;
import com.flyduck.system.mapper.SysConfigValueMapper;
import org.springframework.stereotype.Repository;

/**
 * @program: flyduck-platform2
 * @description:
 * @author: flyduck
 * @create: 2021-04-23 14:55
 **/
@Repository
public class SysConfigValueDao extends ServiceImpl<SysConfigValueMapper, SysConfigValueEntity> {


    public void deleteByConfigKeyAndDeptId(String configKey, String deptId) {
        QueryWrapper<SysConfigValueEntity> wrapper = new QueryWrapper<>();
        wrapper.eq("dept_id",deptId);
        wrapper.eq("config_key",configKey);
        this.baseMapper.delete(wrapper);
    }
}
